   	<!-- 置顶 -->
    <a id="gotop" onclick="GoTop()" style="display:none">TOP</a>
    <!-- 分享 -->
	<div id="share-box">
	       <div id="share-top-box">
	            <h4>分享至：</h4>
	            <div class="bdsharebuttonbox">
	                <a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
	                <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
	                <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
	            </div>
	       </div>
	</div>

	<!-- loading -->
	<div id="loading" ><img style="width:20px;margin:20px 20px;" src="img/loading.gif" /></div>
	<!-- toast -->
	<div id="toast-box" style="z-index:9999;">
	    <span>操作成功</span>
	</div>
	<!-- dialog -->
	<div id="DialogLayer"  style="display:none;"></div>
    <div id="loginDialog" class="dialog" style="display:none;top:40%">
        <p class="mcolor">图书馆登录<i class="icon iconfont icon-close"></i></p>
        <div id="contentDialog">
        	<div id="changepart">

        	</div>
        	<div id="aboutvode" style="overflow:hidden;width:190px;margin:0 auto;">
				<img id="vcodeimg" class="left" style="margin-bottom:10px;" onclick="getcode()"/>
				<input id="vcode" class="binput right" style="margin-right:10px;margin-top:0px;display:inline-block;width:40%" type="text" placeholder="验证码"/>
			</div>
        </div>
        <hr>
        <div style="overflow:hidden;text-align:center;margin-bottom:10px;">
        	<span id="btnDialogCancel" style="width:120px;color:#909090" class="left">算了</span>
        	<span id="btnDialogConfirm" style="width:120px" class="mcolor right">就酱紫</span>
        </div>
	</div>
    <span id="user-center" style="display:none;text-align:center;" ></span>

    <!--拾光js-->
    <script type="text/javascript" src="http://source.timepicker.cn/static/js/ptime_v0.4.min.js"></script>
    <script src="js/function.js"></script>
	<?php if(getUserAgent()=='other'):?>
		    <script type="text/javascript">
		        var img_url = '';
		        if ($('meta[name="img"]')[0].content) {
		            img_url = $('meta[name="img"]')[0].content;
		        }else{
		            img_url = typeof($('img')[0])!='undefined'?$('img')[0].src:$('link[rel="shortcut icon"]')[0].href;
		        };
		        window._bd_share_config = {
		            common : {
		                bdText : $('meta[name="title"]')[0].content,
		                bdDesc : $('meta[name="description"]')[0].content,
		                bdUrl  : window.location.href,
		                bdPic  : img_url
		            },
		            share : [{
		                "bdSize" : 24
		            }]
		        }
		        with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
		    </script>
		<?php endif?>

</body>
</html>
<script type="text/javascript">
	var user_id = <?php if(isset($user_id)){ echo $user_id; }else{ echo 0; } ?>;
	var is_login = 0;
	if (user_id*1>0) {is_login=1;}else{is_login=0;};
	var user_icon = "<?php if(isset($icon)){ echo $icon; }else{ echo 0; } ?>";
	//将头像附上
	if (user_icon*1!=0) {
		var temp = '<img style="height:60px;border-radius:30px;" src="http://source.timepicker.cn'+user_icon+'?imageView2/2/w/120" />';
		$("#user-center").html(temp);
	}else{
		var temp = '<i class="icon iconfont icon-denglu" style="font-size:30px;line-height:54px;"></i>';
		$("#user-center").html(temp);
	};

	// 点击圆按钮
	$("#user-center").on("click",function(){
		if (user_id == 0 ) {
			var url = window.location.href;
			location.href="/ptime/login?return_url="+url;
		}else if($("#user-center img").attr('src')=='img/imgleft.png'){
			location.href="/";
		}else{
			location.href="/center";
		};
	})

//搜索交互
	$("#search").on("focus",function(){
		$("#search-icon").css("color","#5e35b1");
	})
	$("#search").on("blur",function(){
		$("#search-icon").css("color","#9a9a9a");
	})
</script>
